from rest_framework import serializers

from apps.models import HouseKeeping


class ListThingSerializer(serializers.ModelSerializer):
    class Meta:
        model = HouseKeeping
        # 排除字段
        fields = ['title', 'cover', 'price', 'mobile', 'age', 'sex', 'location', 'description','status']
    # def create(self,validate_data):
    #     print(validate_data)
    #     return HouseKeeping.objects.create(**validate_data)
